package com.hzz.openglstudy

import android.opengl.GLSurfaceView
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import com.hzz.openglstudy.render.N1Render
import com.hzz.openglstudy.render.N2AirHockeyRender

class MainActivity : AppCompatActivity() {
    private val mGLSurfaceView by lazy { GLSurfaceView(this) }
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(mGLSurfaceView)

        mGLSurfaceView.setRenderer((N2AirHockeyRender(this)))
    }

    override fun onResume() {
        super.onResume()
        mGLSurfaceView.onResume()
    }

    override fun onPause() {
        super.onPause()
        mGLSurfaceView.onPause()
    }
}
